import { Component, OnInit } from '@angular/core';
import { MatDialog } from '@angular/material/dialog';
import { loginData } from 'src/app/date/logindate';
import { registerData } from 'src/app/date/registerdate';
import { userInfoData } from 'src/app/date/userInfodata';
import { UserInfoService } from 'src/app/services/user-info.service';
import { UserinfoeditComponent } from '../userinfoedit/userinfoedit.component';

@Component({
  selector: 'app-userinfo',
  templateUrl: './userinfo.component.html',
  styleUrls: ['./userinfo.component.css']
})
export class UserinfoComponent implements OnInit {

  constructor(private userinfo:UserInfoService,private b:MatDialog) { }

  public user:userInfoData={};

  ngOnInit(): void {
    console.log(this.userinfo.Getuserinfo())
    this.user=this.userinfo.Getuserinfo()
    console.log(this.user)
  }

  openUserInfoEdit(a:userInfoData){
    const dialogData:userInfoData=this.user
    this.b.open(UserinfoeditComponent,{data:dialogData})
  }


}
